import 'package:flutter_test/flutter_test.dart';
import 'package:starkylin_file_shared/starkylin_file_shared.dart';
import 'package:starkylin_file_shared/starkylin_file_shared_platform_interface.dart';
import 'package:starkylin_file_shared/starkylin_file_shared_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockStarkylinFileSharedPlatform
    with MockPlatformInterfaceMixin
    implements StarkylinFileSharedPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final StarkylinFileSharedPlatform initialPlatform = StarkylinFileSharedPlatform.instance;

  test('$MethodChannelStarkylinFileShared is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelStarkylinFileShared>());
  });

  test('getPlatformVersion', () async {
    StarkylinFileShared starkylinFileSharedPlugin = StarkylinFileShared();
    MockStarkylinFileSharedPlatform fakePlatform = MockStarkylinFileSharedPlatform();
    StarkylinFileSharedPlatform.instance = fakePlatform;

    expect(await starkylinFileSharedPlugin.getPlatformVersion(), '42');
  });
}
